package cate.game.play.part;

import cate.game.attr.FightAttr;
import cate.game.play.fighter.HallowFighter;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "上阵的圣器", detail = "已经计算过属性 加载过技能 用于生成HallowFighter")
public class BattleHallow extends BattleFighter<BattleHallow> {

	@NoteField(value = "圣器类型")
	public int type;

	@NoteField(value = "皮肤ID", detail = "0为没有皮肤")
	public int skinId;

	@NoteField("全队属性")
	public FightAttr teamAttr;

	public HallowFighter buildFighter() {
		HallowFighter fighter = new HallowFighter();
		fighter.init();
		fighter.attr.addSelfAttr(attr);
		fighter.skill.addSkills(skills);
		fighter.teamAttr = teamAttr != null ? teamAttr.copy() : null;
		return fighter;
	}

	public BattleHallow copy() {
		BattleHallow cp = new BattleHallow();
		cp.readFrom(this);
		cp.type = type;
		cp.skinId = skinId;
		cp.teamAttr = teamAttr != null ? teamAttr.copy() : null;
		return cp;
	}
}
